<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>选择银行</title>
    <link rel="stylesheet" href="css/base.css" />
    <link rel="stylesheet" href="css/all.css" />
    <link rel="stylesheet" href="css/choose.css" />
</head>
<style type="text/css">
	.name-two {
	    width: 100%;
	    height: .98rem;
	    border-bottom: .01rem solid #ddd;
	    line-height: .98rem;
	}
	
	.names {
	    display: inline-block;
	    vertical-align: middle;
	    margin: -0.14rem .2rem 0 .3rem;
	}
	
	
</style>
<body>
<div>
    <div class="heads">
        <span href="javascript:;" onclick="go()"><img src="img/zuojiantou.png" alt="" class="arrows"></span>
        <h1 class="titles">选择所属银行</h1>
    </div>
    <<div class="middle">
        <!--<div class="name-two">
            <img class="names" src="img/youzheng.png" alt="">
            <span class="name-one">邮政银行</span>
        </div>
        <div class="name-two">
            <img class="names" src="img/gongshang.png" alt="">
            <span class="name-one">工商银行</span>
        </div>
        <div class="name-two">
            <img class="names" src="img/jianshe.png" alt="">
            <span class="name-one">建设银行</span>
        </div>
        <div class="name-two">
            <img class="names" src="img/nongye.png" alt="">
            <span class="name-one">农业银行</span>
        </div>
        <div class="name-two">
            <img class="names" src="img/zhaoshang.png" alt="">
            <span class="name-one">招商银行</span>
        </div>
        <div class="name-two">
            <img class="names" src="img/zhongguo.png" alt="">
            <span class="name-one">中国银行</span>
        </div>
        <div class="name-two">
            <img class="names" src="img/zhongxin.png" alt="">
            <span class="name-one">中信银行</span>
        </div>
        <div class="name-two">
            <img class="names" src="img/pingan.png" alt="">
            <span class="name-one">平安银行</span>
        </div>
        <div class="name-two">
            <img class="names" src="img/guangfa.png" alt="">
            <span class="name-one">广发银行</span>
        </div>
        <div class="name-two">
            <img class="names" src="img/minsheng.png" alt="">
            <span class="name-one">民生银行</span>
        </div>
        <div class="name-two">
            <img class="names" src="img/guangda.png" alt="">
            <span class="name-one">光大银行</span>
        </div>
        <div class="name-two">
            <img class="names" src="img/jiaotong.png" alt="">
            <span class="name-one">交通银行</span>
        </div>-->
    </div>
     
</div>
<script src="js/x_rem.js"></script>
<script src="js/jquery.js"></script>
<script src="js/secondLevel.js"></script>
<script src="js/all.js"></script>
<script type="text/javascript">
	$.ajax({
		type:"post",
		url:Url+"/bankCard/searchBankType",
		xhrFields:{
			withCredentials: true
		},
		data:{
			page:"1",
			rows:"100"
		},
		success:((data)=>{
		 	var html = "";
			for(let i=0; i<data.rows.length; i++){
				console.log(data.rows[i]);
				html+=`
					<a href="add-bank-card.html?bankTypeId=${data.rows[i].bankTypeId}&bankName=${data.rows[i].bankName}">
						<div class="name-two">
				            <img class="names" src="${data.rows[i].picture}" alt="">
				            <span class="name-one">${data.rows[i].bankName}</span>
				        </div>
				    </a>
				`
			}
			$(".middle").html(html);
			
		}),
		error:((err)=>{
			console.log(err);
		})
	});	
	
	

	
	
	
</script>
</body>
</html>